package com.dreem.decorator;

import com.dreem.decorator.adds.Soy;
import com.dreem.decorator.adds.Sugger;
import com.dreem.decorator.coffee.Latte;
import com.dreem.decorator.coffee.Mocha;
import com.dreem.decorator.service.Drink;

/**
 * @program: DesignParrtern
 * @description: 实现类
 * @author: Peng
 * @create: 2021-02-15  10:36
 **/
public class CoffeeBar {
    public static void main(String[] args){
        Drink order = new Latte();

        order = new Sugger(order);
        order = new Soy(order);

        System.out.println(order.getDescription());
        System.out.println(order.cost());
        System.out.println("========================");
        Drink order1 = new Mocha();

        System.out.println(order1.getDescription());
        System.out.println(order1.cost());

    }
}
